<!--
描述：补全诗句信息-新增组件
开发人：zyanming
开发日期：2019年9月13日
-->

<template lang="pug">
    kalix-dialog.user-add(bizKey="verse" ref="kalixBizDialog" v-bind:form-model.sync="formModel" v-bind:targetURL="targetURL")
        div.el-form(slot="dialogFormSlot")
            div.s-flex
                el-form-item.s-flex_item(label="类别" prop="type" v-bind:label-width="labelWidth")
                    kalix-dict-select(v-model="formModel.type"  appName="enrolment" dictType="类别" )
            div.s-flex
                el-form-item.s-flex_item(label="题干" prop="stem" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.stem" type="textarea")
            div.s-flex
                el-form-item.s-flex_item(label="空格A答案" prop="answerA" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.answerA")
                el-form-item.s-flex_item(label="空格B答案" prop="answerB" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.answerB")
            div.s-flex
                el-form-item.s-flex_item(label="空格C答案" prop="answerC" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.answerC")
                el-form-item.s-flex_item(label="空格D答案" prop="answerD" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.answerD")
            div.s-flex
                el-form-item.s-flex_item(label="试题解析" prop="analysis" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.analysis")
</template>

<script type="text/ecmascript-6">
    import FormModel from './model'
    import {VerseURL} from '../../config.toml'

    export default {
        name: 'VerseAdd',
        data() {
            return {
                formModel: Object.assign({}, FormModel),
                rules: {
                    //  userId: [{type: 'number', required: true, message: '请输入学生姓名', trigger: 'change'}]
                },
                targetURL: VerseURL,
                labelWidth: '120px'
            }
        },
        components: {},
        created() {
        },
        methods: {}
    }
</script>

<style scoped lang="stylus">
    .el-form
        padding 30px 70px 30px 20px
</style>
